home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
THQ E3 2001 International Press Disc (Europe)
/
THQ E3 2001 International Press Disc (Europe).bin
/
js
/
skuExport.js
< prev
Wrap
Text File
|
2001-05-03
|
3KB
|
103 lines
var doit=true;
var NS4=(document.layers)?true:false;
var IE4=(document.all)?true:false;
var IE5=(navigator.userAgent.indexOf('MSIE 5') > 0)?true:false;
var doit=NS4||IE4;
if( doit )
{
var show=(NS4)?"show":"visible";
var hide=(NS4)?"hide":"hidden";
}
function popGrid(prefix,start,window,imgA)
{
for(i=1; i <= window; i++)
{
if( preLayer != "" )
{
image = preLayer[prefix+layerid+i].document.images[prefix+"i"+i];
}
else
{
image = document.images[prefix+"i"+i];
}
if( i+start-1 > imgA.length-1 )
{
image.src = noImage.src;
}
else
{
image.src = dA[prefix] + imgA[i+start-1].split("|")[0];
}
}
}
function viewAsset(prefix, position)
{
d = wA[prefix]["i"][ position + wA[prefix]["s"] - 1 ];
if(typeof(d) == "undefined") return false;
if( d.split("|")[2] == "" )
{
alert("This asset is a sample. Please visit the THQ Press Extranet\nfor updated assets, or contact your local admin.")
}
else
{
newwin = window.open( "assetWindow.html?file=" + URLencode( "files/" + prefix + "/" + d.split("|")[2]), "e3file", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes" );
}
}
function walk(d,p,f,w,i)
{
n = f+(d*w);
if(f+(d*w)>=i.length) n=1;
if(f+(d*w)<1) { (i.length-1)%w; n=(i.length)-((i.length-1)%w); }
f=n; wA[p]["s"]=n;
showAssetProgress(p);
popGrid(p,f,w,i);
}
function showAssetInfo(prefix, position, evnt)
{
position = position + wA[prefix]["s"] - 1;
assetData = wA[prefix]["i"][position];
if( !assetData ){ return true; }
metaFooter = (assetData.split("|")[2] == "") ? ("<br />Hires or unapproved assets are not available for viewing.<br />This asset is a sample. Please visit the THQ Press Extranet<br/>for updated assets, or contact your local admin.") : ("");
metaData = assetData.split("|")[3] + metaFooter;
showToolTip( metaData, "assetToolTip", evnt );
return true;
}
function showAssetProgress( prefix )
{
progressMax = ( ( wA[prefix]["s"] + wA[prefix]["w"] - 1 ) > (wA[prefix]["i"].length - 1) ) ? ( wA[prefix]["i"].length - 1 ) : ( wA[prefix]["s"] + wA[prefix]["w"] - 1 )
progressRange = ( progressMax == ( wA[prefix]["s"] ) ) ? ( progressMax ) : ( ( wA[prefix]["s"]) + "-" + progressMax ) ;
progressStatus = progressRange + " / " + ( wA[prefix]["i"].length - 1 );
progressStatus = "<div class=\"assetProgress\">" + progressStatus + "</div>"
tl = (NS4) ? (document.layers[prefix + "CountNS"]) : (document.all[prefix + "Count"]);
if( !tl ) return;
if( NS4 )
{
tl.document.write( progressStatus );
tl.document.close();
tl.top = pageTop( document.layers[prefix + "Count"] );
tl.left = pageLeft( document.layers[prefix + "Count"] ) - (layerWidth(tl) / 2);
}
else if( IE4 )
{
tl.innerHTML = progressStatus
}
tlay = (NS4) ? (tl) : (tl.style);
tlay.visibility = show;
return true;
}